
#ifndef CLIENT_INTERFACE_UI_H
#define CLIENT_INTERFACE_UI_H

#include <QMainWindow>
#include <QtGui>

#include "ui_ClientUI.h"

#include "../client/client-to-client-server.h"
#include "../client/client-to-client-thread-client.h"
#include "../base/server-client-thread.h"
#include "../base/client-id.h"
#include "../base/log.h"
#include "../base/message-server-client.h"
#include "../base/file-list.h"
#include "../base/fingerprint.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>

class ClientInterfaceUI : public QMainWindow, private Ui::windowMain
{
  Q_OBJECT

public:
    ClientInterfaceUI(QWidget* parent = 0, Qt::WFlags fl = 0 );
    ~ClientInterfaceUI();
    /*$PUBLIC_FUNCTIONS$*/
    void displaySocketError( int socketError, const QString &message );


public slots:
  /*$PUBLIC_SLOTS$*/
    void send_file_list();

protected:
  /*$PROTECTED_FUNCTIONS$*/

protected slots:
  /*$PROTECTED_SLOTS$*/
    void enable_connect_button();
    void send_login();
    void send_logout();
    void add_files_to_share();
    void process_pending_messages();
    void send_query();

private:
    ClientToClientThreadClient client_to_client_thread_;                        // se creeaza un nou thread cand clientul vrea sa se conecteza la alt client
                                                                                // e pusa pentru testare ca obiect membru, vor trebui create obiecte de acest 
                                                                                // tip in timpul executiei,
                                                                                // de fiecare cand se face o noua conexiune cu un client
    ClientToClientServer       client_to_client_server_;                        // creeaza cate un thread de fiecare data cand se face o conexiune noua
    ServerClientThread       client_to_server_thread_;                         // thread separat pentru comunicarea nu serverul
    FileList                    file_list_;                                     // lista de fisiere
    bool connected_;
};

#endif

